<%--
    Document   : usershow
    Created on : 2012-3-7, 14:45:21
    Author     : xiaoxiao
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib  prefix="s"  uri="/struts-tags"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>用户列表</title>
        <link href="css/global.css" rel="stylesheet" type="text/css">
        <style type="text/css">
            div.header
            {
                font-family: 微软雅黑;
                padding:18px;
                color:white;
                background-color:#7B994F;
                text-align: center;
                height: 60px;
                width: 220px;
                margin-left: 420px;
                margin-top: 50px;
            }
        </style>
        <script  type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function( ) {
                $('table.striped tr:even').addClass('even');
                $('table.striped tbody tr').mouseover(function() {
                    $(this).addClass('highlight');
                    $(this).css('cursor','pointer');
                }).mouseout(function() {
                    $(this).removeClass('highlight');
                });
            });
        </script>
    </head>
    <body>
        <s:if test="%{#session.qx}">
            <div id="examup">
                <s:form action="userdeletemany" method="post" >
                    <table id="usershow" class="striped">
                        <tr>
                            <th>选择</th>
                            <th>用户ID</th>
                            <th>用户名</th>
                            <th>密码</th>
                            <th>邮箱</th>
                            <th>查看/编辑</th>
                            <th>删除</th>
                        </tr>
                        <s:iterator value="alluser" status="st">
                            <tr>
                                <td width="30px"><input type="checkbox" name="userid" value="<s:property value="userid"></s:property>"></td>
                                <td width="60px"><s:property value="userid"></s:property></td>
                                <td><s:property value="username"></s:property></td>
                                <td><s:property value="password"></s:property></td>
                                <td><s:property value="email"></s:property></td>
                                <td width="60px"> <a href="userview.action?userid=<s:property value="userid"></s:property>">查看/编辑</a></td>
                                <td width="50px"> <a href="userdelete.action?userid=<s:property value="userid"></s:property>">删除</a></td>
                            </tr>
                        </s:iterator>
                    </table>
                    <input type="submit" name="button" id="submit" value="删除所选">
                    <input type="button" name="button" id="submit" value="增加用户"
                           onClick="location='useradd.jsp'">
                </s:form>

                <div id="fanye">
                    <div id="ye">
                        共<s:property value="num"></s:property>条 &nbsp;
                        <s:property value="pagenumber"></s:property>/<s:property value="totalpage"></s:property> 页
                        <s:url id="firstpage" action="upageAction">
                            <s:param name="pagenumber">1</s:param>
                        </s:url>
                        <s:a href="%{firstpage}">首页</s:a>

                        <s:url id="prepage" action="upageAction">
                            <s:param name="pagenumber">
                                <s:property value="pagenumber-1"></s:property>
                            </s:param>
                        </s:url>
                        <s:a href="%{prepage}">上一页</s:a>

                        <s:url id="nextpage" action="upageAction">
                            <s:param name="pagenumber">
                                <s:property value="pagenumber+1"></s:property>
                            </s:param>
                        </s:url>
                        <s:a href="%{nextpage}">下一页</s:a>

                        <s:url id="lastpage" action="upageAction">
                            <s:param name="pagenumber">
                                <s:property value="totalpage"></s:property>
                            </s:param>
                        </s:url>
                        <s:a href="%{lastpage}">末页</s:a>
                    </div>
                    <div id="go">
                        <s:form action="upageAction">
                            转到  第 <s:textfield id="tf" name="pagenumber" ></s:textfield> 页 <s:submit id="submit" value="GO"></s:submit>
                        </s:form>
                    </div>
                </div>
            </div>
        </s:if>
        <s:else>
            <div class="header">
                您没有管理员权限！
                <br>请以管理员身份登陆管理
            </div>
        </s:else>
    </body>
</html>
